package cn.sharp.bbs.dao.admin;

import cn.sharp.bbs.entity.BO.PermNode;
import cn.sharp.bbs.entity.DO.Rolepermission;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleManageDao {
    List<PermNode> getSubPerms(Long parent);
    int countByRoleAndPerm(Long role_id, Long pid);

    @Select("select per_id from t_role_permission where role_id=#{role_id}")
    List<Long> listPermForRole(Long role_id);

    void addPermsToRole(List<Rolepermission> include);

    void delPermsFromRole(List<Rolepermission> exclude);

    List<PermNode> getRolePerms();
}
